package ldh.fx.adminfx.constant;

public enum MouldStatus {
    Default(0, "待启动"),
    Process(1, "进行中"),
    Hold(2, "暂停"),
    END(3, "结束"),
    ;
    private int value;
    private String desc;

    private MouldStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static MouldStatus getByValue(int value) {
        for(MouldStatus mouldStatus : MouldStatus.values()) {
            if (mouldStatus.getValue() == value) {
                return mouldStatus;
            }
        }
        throw new RuntimeException("错误的VAlue");
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }
}
